#include "BinarySearchTree.h"
#include <iostream>
#include <cstdlib>
#include <vector>

int main(int argc, char* argv[])
{
    BinaryTree<int> A(6);
    A.insert(3);
    A.insert(9);
    A.insert(1);
    A.insert(2);
    A.insert(7);
    A.insert(11);
    A.inorder_walk();
    A.Delete(7);
    A.inorder_walk();
    A.test_successor(A.tree_search(2));
    A.test_predecessor(A.tree_search(3));
    A.test_min();
    A.test_max();
    {
    	std::cout<<A.tree_search(7)<<std::endl;
		A.~BinaryTree<int>();
		std::cout<<A.tree_search(7)<<std::endl;
	}
	std::vector<int> B(6);
	B[0] = 4;
	B[1] = 7;
	B[2] = 3;
	B[3] = 9;
	B[4] = 5;
	B[5] = 6;
	BinaryTree<int> C;
 	C.sort(B); 
    return 0;
};
